home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.11 Nov 88 / BasicSource Stuff / Display Fonts Source < prev    next >
Encoding:
Text File  |  1988-09-12  |  806 b   |  35 lines  |  [TEXT/MSBB]

  1. ' Display Fonts
  2. ' ©Copyright 1988 MacTutor
  3. ' by Dave Kelly
  4.  
  5. ' This program will display all your system fonts
  6. ' with a sample and by name.
  7. ' This program uses the ToolBox statement in
  8. ' QuickBASIC version 1.0
  9.  
  10. ToolBox "I"    ' Initialize Toolbox
  11. DEFINT a-z
  12. x=0
  13. FontName$=""
  14. FOR i=0 TO 254    ' Cycle through all the fonts
  15.     TEXTFONT(i)
  16.     GOSUB GetFontsname
  17.     IF FontName$<>"" THEN
  18.         PRINT "This is a sample of font #";
  19.         CALL TEXTFONT(0):PRINT i;"  ";FontName$
  20.         IF x/10 >1 THEN
  21.              x=0:PRINT "Click mouse button to continue..."
  22.              WHILE MOUSE(0)<>1 :WEND:CLS
  23.          ELSE
  24.              x=x+1
  25.         END IF
  26.     END IF
  27. NEXT
  28. WHILE MOUSE(0)<>1:WEND
  29. END
  30.  
  31. GetFontsname:    'Get the name of the Font with ID = i
  32. TrapNo%=&HA8FF
  33. ToolBox "P",TrapNo%,(i),FontName$
  34. RETURN
  35.